@import "colors";
@import "common";
@import "task-filter-settings-form";

* {
  box-sizing: border-box;
}

body {
  padding: 2px;
}

header {
  p {
    font-size: 0.9em;
    color: #999;
  }
  h3 {
    margin-bottom: 0;
  }

  &:first-child h3 {
    margin-top: 0;
  }
}

p pre {
  display: inline;
}

button {
  padding: 7px;
  height: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

ul.settings-list {
  list-style: none;
  padding-left: 15px;

  li {
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    .indent {
      margin-left: 20px;
    }
  }
}

.horizontal-separator {
  background-color: rgba(0, 0, 0, 0.15);
  height: 1px;
}

.label-and-input {
  flex: 1;
  display: flex;
  align-items: center;

  > .label {
    flex: 1;
    min-width: 100px;
    margin-right: 5px;
  }

  > .input {
    flex: 4;
    display: flex;

    input {
      flex: 1;
    }
  }
}

.connection-settings {
  .host-settings {
    .input {
      display: flex;
      align-items: center;

      > :not(select):not(input) {
        margin: 0 3px;
      }
    }
  }

  button[type="submit"] {
    margin-left: auto;
  }
}

.protocol-setting,
.domain-setting {
  flex-shrink: 0;
}

.host-setting {
  flex: 1;
}

.port-setting {
  width: 80px;
  max-width: 80px;
}

.connection-test-result {
  display: flex;
  flex: 1;
  margin-right: 10px;

  .fa {
    margin-left: auto;
    margin-right: 5px;
    font-size: 14px;
  }
}

.polling-interval {
  width: 60px;
  margin: 0 5px;
}

.wrong-polling-interval {
  margin-left: 5px;
}

textarea.debugging-output {
  width: calc(100% - 20px);
  height: 3em;
}

.cannot-save {
  display: flex;
  justify-content: center;
  margin: 2px;
  padding: 6px;
  border-radius: 3px;
  border: 1px solid $color-error;
  background-color: fade-out($color-error, 0.8);
}
